const getters = {

  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  userName: state => state.user.userName,
  storeId: state => state.user.storeId,
  userId: state => state.user.userId,
  storeName: state => state.user.storeName,
  roles: state => state.user.roles,
  rolesTable: state => state.user.rolesTable,
  permission_routes: state => state.user.routes,
  position: state => state.user.position,
  positionRoles: state => state.user.positionRoles,
  areaList: state => state.user.areaList,
  introduction: state => state.user.introduction,

  catoryTressData: state => (sessionStorage.getItem('catoryTressData') && JSON.parse(sessionStorage.getItem('catoryTressData'))) || state.procductShopping.catoryTressData,
  cartNum: state => (sessionStorage.getItem('cartNum') && JSON.parse(sessionStorage.getItem('cartNum'))) || state.procductShopping.cartNum,
  userInfo: state => (sessionStorage.getItem('userInfo') && JSON.parse(sessionStorage.getItem('userInfo'))) || state.procductShopping.userInfo

}
export default getters
